var t = getApp();

Page({
    data: {
        id: "",
        img_url: "",
        btn_name: "",
        reason_data: "",
        order_state: "",
        show1: !1
    },
    onLoad: function(t) {
        t.id && this.setData({
            id: t.id
        }), this.getJson();
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    getJson: function() {
        var n = this, o = t.getNetAddresss("remittance.remittance-record");
        o += "&order_id=" + this.data.id, t._getNetWork({
            url: o,
            success: function(t) {
                var o = t.data;
                1 == o.result ? n.setData({
                    img_url: o.data.report_url,
                    btn_name: o.data.button_models.name,
                    reason_data: o.data.audit_note,
                    order_state: o.data.status_name
                }) : wx.showToast({
                    icon: "none",
                    title: o.msg,
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    causeShow: function() {
        this.setData({
            show1: !0
        });
    },
    causeClose: function() {
        this.setData({
            show1: !1
        });
    },
    cancelTransfer: function() {
        var n = this;
        wx.showModal({
            title: "提示",
            content: "此操作将取消汇款申请, 是否继续?",
            success: function(o) {
                if (o.confirm) {
                    var e = t.getNetAddresss("remittance.remittance-record-operation.cancel");
                    e += "&order_id=" + n.data.order_id, t._getNetWork({
                        url: e,
                        success: function(t) {
                            1 == t.data.result && wx.showToast({
                                icon: "none",
                                title: "取消申请成功",
                                duration: 1500
                            });
                        },
                        fail: function(t) {
                            console.log(t);
                        }
                    });
                } else o.cancel && wx.showToast({
                    icon: "none",
                    title: "已取消操作",
                    duration: 1500
                });
            }
        });
    }
});